package com.zmn.oms.dubbo.dto.zmn.comment;

import com.zmn.common.constant.GlobalConsts;
import com.zmn.oms.common.constant.OrderConsts;
import com.zmn.oms.dubbo.dto.zmn.codemap.CodeMapDIO;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

/**
 * 类描述：评价页面
 *
 * @author lujia
 * @date 2019/01/23 17:18
 */
@Data
public class CommentDIO implements Serializable {

    /**
     * 订单Id
     */
    @NotNull(message = "订单Id不能为空")
    private Long orderId;

    /**
     * 操作平台
     */
    @NotNull(message = "操作平台不能为空")
    protected Integer operatorPlat;

    /**
     * 操作者类型
     *
     * @see GlobalConsts#OPERATE_USER_TYPE_USER
     */
    @NotNull(message = "操作者类型不能为空")
    protected Integer operatorType;

    /**
     * 操作人
     */
    @NotNull(message = "操作人")
    @Size(max = 20, message = "操作人名称最多为20个字符")
    protected String operator;

    /**
     * 操作者ID
     */
    @NotNull(message = "操作者ID不能为空")
    protected Long operatorId;

    /**
     * 评星
     */
    @NotNull(message = "评星不能为空")
    @Min(value = 1, message = "评星最小为1")
    private Integer score;

    /**
     * 评价图片
     */
    private String picUrls;

    /**
     * 评价内容
     */
    private String content;

    /**
     * 评价选项
     */
    private List<CodeMapDIO> codeMapList;
}
